// 类组件
import React, { Component } from 'react'
// 1. 定义路由规则
import { Route } from 'react-router-dom'

// 2. 引入需要渲染的组件
import Home from './views/Home'
import About from './views/About'

class App extends Component {
  render() {
    return (
      <div>
        <h3>App应用</h3>
        <hr />

        {/* 
        3. 定义路由规则  (写在jsx语法中)
        path 字符串 路由匹配的路径
        component 路由匹配成功后要渲染的组件 默认用类  
        */}
        <Route path="/home" component={Home} />
        <Route path="/about" component={About} />
      </div>
    )
  }
}

export default App
